package com.weu.service.impl;

import com.weu.bean.Comment;
import com.weu.mapper.CommentMapper;
import com.weu.service.CommentService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

@Service
public class CommentServiceImpl implements CommentService {

    @Resource
    private CommentMapper commentMapper;

    @Override
    public List<Comment> getAllComments() {
        return commentMapper.getAllComments();
    }

    @Override
    public List<Comment> getComments(int blogid) {
        return commentMapper.getComments(blogid);
    }
    @Override
    public int insertComment(Comment comment) {
        return commentMapper.insertComment(comment);
    }

    @Override
    public int delCommentById(int id) {
        return commentMapper.delCommentById(id);
    }

}
